let btncontent = document.querySelectorAll('.All ul .btn')
let modal = document.querySelector('.modal')
let login_content = document.querySelector('.login_content')
console.log(btncontent);
btncontent.forEach(function(btns, index) {
    btns.addEventListener('click', function() {
        modal.style.display = 'block'
    })
})
modal.addEventListener('click', function(e) {
    if (e.target.className === 'modal') {
        modal.style.display = 'none'
    }
})

function createLogin(fatherDom, modal) {
    let htmlStr = `
  <div class="login_content">
            <div class="yuanma_logo">
                <img src="./imgs/loginlogo.png" alt="">
            </div>
            <div class="login_method">
                <a href="#" class="method active">账号登录</a>
                <a href="#" class="method">扫码登录</a>
            </div>
            <div class="page on">
                <div class="textbox">
                    <div class="namepasinputs">
                        <input type="text" placeholder="用户名/手机号/邮箱" class="username">
                        <input type="password" name="" id="" placeholder="密码" class="pas">
                    </div>
                    <a href="#" class="forget">忘记密码</a>
                    <button class="loginbtn">登录</button>
                    <p class="lastP1">还没有源码账号，<a href="#">立即注册</a></p>
                </div>
            </div>



            <div class="page">
                <div class="code">
                    <img src="./imgs/showqrcode.jpg" alt="">
                    <p>微信扫码登录</p>
                    <p class="secondP">未关注源码科技公众号，请先关注后再登录</p>
                </div>
                <p class="lastP2">还没有源码账号，<a href="#">立即注册</a></p>
            </div>

        </div>
  `
    fatherDom.innerHTML = htmlStr
    if (!modal) {
        return
    }
}
createLogin(modal)